From: Marco Trevisan (TreviƱo) Date: Wed, 17 Sep 2025 17:04:46 +0000 (+0200) Subject: gdm/util: Clear the request if user verifier connection is closed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~32^2~5^2^2~12 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=704f90b68de8000387a2cc38f25fc83e08b66f4f;p=gnome-shell.git gdm/util: Clear the request if user verifier connection is closed Similarly to previous commit, in case the user verifier connection is closed we should just clear the user verifier instance, since starting from this point is going to be just invalid. Part-of: (cherry picked from commit 91a736a09ed9f5e2d11c733535b479fbf4f4fddf) --- diff --git a/js/gdm/util.js b/js/gdm/util.js index 8cd18f003..f75c581a9 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -200,6 +200,7 @@ export class ShellUserVerifier extends Signals.EventEmitter { _clearUserVerifier() { if (this._userVerifier) { this._disconnectSignals(); + this._userVerifier.get_connection().disconnectObject(this); this._userVerifier.run_dispose(); this._userVerifier = null; if (this._userVerifierChoiceList) { @@ -508,6 +509,8 @@ export class ShellUserVerifier extends Signals.EventEmitter { this._clearUserVerifier(); this._userVerifier = await this._client.open_reauthentication_channel( userName, this._cancellable); + this._userVerifier.get_connection().connectObject('closed', + () => this.clear(), this); } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) return; @@ -540,6 +543,8 @@ export class ShellUserVerifier extends Signals.EventEmitter { this._clearUserVerifier(); this._userVerifier = await this._client.get_user_verifier(this._cancellable); + this._userVerifier.get_connection().connectObject('closed', + () => this.clear(), this); } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) return;